﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Fierce.Entity.Basic;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Fierce.Core.Configuration.Basic
{
    internal partial class BasicUserDepartmentPostConfiguration : EntityConfigurationBase<BasicUserDepartmentPost>
    {
        internal override void MapperInitialization(EntityTypeBuilder<BasicUserDepartmentPost> builder)
        {
            builder.HasOne(m => m.BasicUser).WithMany().HasForeignKey(m => m.UserID);
            builder.HasOne(m => m.BasicDepartment).WithMany().HasForeignKey(m => m.DepartmentID);
            builder.HasOne(m => m.BasicPost).WithMany().HasForeignKey(m => m.PostID);
        }
    }
}
